#include <cstdlib>
#include <ctime>
#include <unistd.h>
#include "ThreadPool.hpp"
#include "Task.hpp"

int main()
{
    srand((unsigned int)time(nullptr));
    ThreadPool<Task>::getThreadPool()->run();
    while(true)
    {
        int x=rand()%100+1;
        usleep(5432);
        int y=rand()%100+1;
        Task task(x,y);
        ThreadPool<Task>::getThreadPool()->push(task);
        logMessage(NORMAL,"%d+%d=?",x,y);
        sleep(1);
    }
    return 0;
}